import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  mode: "hash",
  routes: [
    {
      path: '/',
      redirect: '/regist'
    },
    {
      // 登录
      path: '/login',
      component: resolve => require(['../components/pages/login.vue'], resolve),
    },
    {
      // 注册
      path: '/regist',
      component: resolve => require(['../components/pages/regist.vue'], resolve),
    },
    {
      // 忘记密码
      path: '/rePassword',
      component: resolve => require(['../components/pages/rePassword.vue'], resolve),
    },
    {
      // 更改支付密码
      path: '/toResetPayPassword',
      component: resolve => require(['../components/pages/toResetPayPassword.vue'], resolve),
    },
    {
      // 首页
      path: '/index',
      component: resolve => require(['../components/common/home.vue'], resolve),
      children: [{
          path: '/',
          component: resolve => require(['../components/pages/index.vue'], resolve),
        }
      ]
    },
    {
      // 详情页
      path: '/detail',
      component: resolve => require(['../components/pages/detail.vue'], resolve)
    },
    {
      // 分类
      path: '/class',
      component: resolve => require(['../components/common/home.vue'], resolve),
      children: [{
          path: '/class',
          component: resolve => require(['../components/pages/class.vue'], resolve),
        },{
          path: '/appupload',
          component: resolve => require(['../components/pages/uploadapp.vue'], resolve),
        }
      ]
    },
    {
      path: '/applist',
      component: resolve => require(['../components/pages/applist.vue'], resolve),
    },
    {
      // 排行
      path: '/rank',
      component: resolve => require(['../components/common/home.vue'], resolve),
      children: [{
          path: '/rank',
          component: resolve => require(['../components/pages/rank.vue'], resolve),
        }
      ]
    },
    {
      // 游戏
      path: '/game',
      component: resolve => require(['../components/common/home.vue'], resolve),
      children: [{
          path: '/game',
          component: resolve => require(['../components/pages/game.vue'], resolve),
        }
      ]
    },
    {
          // 钱包
          path: '/wallet',
          component: resolve => require(['../components/pages/games/wallet.vue'], resolve)
        },{
          // 抽奖
          path: '/luckDraw',
          component: resolve => require(['../components/pages/games/luckDraw.vue'], resolve)
        },{
          // 我的钱包
          path: '/mywallet',
          component: resolve => require(['../components/pages/games/mywallet.vue'], resolve)
          },{
          // 我的
          path: '/my',
          component: resolve => require(['../components/pages/games/my.vue'], resolve)
        },

        {
            // 矿池
            path: '/orepull',
            component: resolve => require(['../components/pages/games/orepull.vue'], resolve)
        },
        {
            // 矿池
            path: '/fans',
            component: resolve => require(['../components/pages/games/fans.vue'], resolve)
        },
        {
            // 激活
            path: '/jihuo',
            component: resolve => require(['../components/pages/games/jihuo.vue'], resolve)
        },
        {
            // 复投
            path: '/futou',
            component: resolve => require(['../components/pages/games/futou.vue'], resolve)
        },
        {
            // 转账
            path: '/carry',
            component: resolve => require(['../components/pages/games/carry.vue'], resolve)
        },
        {
            // 提现
            path: '/Putforward',
            component: resolve => require(['../components/pages/games/Putforward.vue'], resolve)
        },
        {
            // 充值
            path: '/Recharge',
            component: resolve => require(['../components/pages/games/Recharge.vue'], resolve)
        },
        {
            // 充值
            path: '/OBTRecharge',
            component: resolve => require(['../components/pages/games/OBTRecharge.vue'], resolve)
        },
        {
            // c2c
            path: '/C2C',
            component: resolve => require(['../components/pages/games/C2C.vue'], resolve)
        },
        {
            // c2c
            path: '/myC2C',
            component: resolve => require(['../components/pages/games/myC2C.vue'], resolve)
        },
        {
            // c2c
            path: '/C2CBuyOBT',
            component: resolve => require(['../components/pages/games/C2CBuyOBT.vue'], resolve)
        },
        {
            // c2c
            path: '/createC2C',
            component: resolve => require(['../components/pages/games/createC2C.vue'], resolve)
        },
        {
            // c2c
            path: '/historyorder',
            component: resolve => require(['../components/pages/games/historyorder.vue'], resolve)
        },{
            // c2c
            path: '/selllist',
            component: resolve => require(['../components/pages/games/selllist.vue'], resolve)
        },{
            // c2c
            path: '/C2CSellObt',
            component: resolve => require(['../components/pages/games/C2CSellObt.vue'], resolve)
        },{
            // c2c
            path: '/buyC2C',
            component: resolve => require(['../components/pages/games/buyC2C.vue'], resolve)
        },{
            // c2c
            path: '/sellC2C',
            component: resolve => require(['../components/pages/games/sellC2C.vue'], resolve)
        },
    {
      // 公告页
      path: '/notice',
      component: resolve => require(['../components/pages/notice.vue'], resolve)
    },
    {
      // 我的
      path: '/mine',
      component: resolve => require(['../components/common/home.vue'], resolve),
      children: [{
          path: '/mine',
          component: resolve => require(['../components/pages/mine.vue'], resolve),
        }
      ]
    },
    {
      // 密码修改
      path: '/passwordreset',
      component: resolve => require(['../components/pages/passwordreset.vue'], resolve)
    },
    {
      // 关于我们
      path: '/about-us',
      component: resolve => require(['../components/pages/aboutus.vue'], resolve)
    },


      {
          // 反馈页面
          path: '/feedback',
          component: resolve => require(['../components/pages/feed-back.vue'], resolve)
      }
  ]
})
